-- GENERATED SPELL FOR [Deeprot Tangler] --


function spell0_13142(pUnit, Event) --@Entangling Roots,n/a--
pUnit:FullCastSpellOnTarget(21331,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_13142', 16500, 1)
end

function spell1_13142(pUnit, Event) --@Thorns,n/a--
pUnit:FullCastSpellOnTarget(21337,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_13142', 643, 1)
end

function Sorts_13142(pUnit, Event)
local choix_sorts_13142 = math.random(0, 1)
if choix_sorts_13142 == 0 then
pUnit:RegisterEvent('spell0_13142', 1, 1)
end
if choix_sorts_13142 == 1 then
pUnit:RegisterEvent('spell1_13142', 1, 1)
end
end

function mob13142_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_13142', math.random(1500, 3000), 1)
end

function mob13142_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob13142_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob13142_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(13142, 1, 'mob13142_Action')
RegisterUnitEvent(13142, 2, 'mob13142_Leave')
RegisterUnitEvent(13142, 3, 'mob13142_Kill')
RegisterUnitEvent(13142, 4, 'mob13142_Die')
